# eric7.WebBrowser.Sync.DirectorySyncHandler

Module implementing a synchronization handler using a shared directory.

### Global Attributes

None

### Classes

DirectorySyncHandler | Class implementing a synchronization handler using a shared directory.

### Functions

None

## DirectorySyncHandler

Class implementing a synchronization handler using a shared directory.

### Signals

syncError(message)
  emitted for a general error with the error message
syncFinished(type_, done, download)
  emitted after a synchronization has finished
syncMessage(message)
  emitted to send a message about synchronization
syncStatus(type_, message)
  emitted to indicate the synchronization status

### Derived from

SyncHandler

### Class Attributes

None

### Class Methods

None

### Methods

DirectorySyncHandler | Constructor
__downloadFile | Private method to downlaod the given file.
__initialSync | Private slot to do the initial synchronization.
__initialSyncFile | Private method to do the initial synchronization of the given file.
__syncFile | Private method to synchronize the given file.
__uploadFile | Private method to upload the given file.
initialLoadAndCheck | Public method to do the initial check.
shutdown | Public method to shut down the handler.
syncBookmarks | Public method to synchronize the bookmarks.
syncHistory | Public method to synchronize the history.
syncPasswords | Public method to synchronize the passwords.
syncSpeedDial | Public method to synchronize the speed dial data.
syncUserAgents | Public method to synchronize the user agents.

### Static Methods

None

#### DirectorySyncHandler (Constructor)

DirectorySyncHandler(parent=None)

Constructor

parent (QObject)
  reference to the parent object

#### DirectorySyncHandler.__downloadFile

__downloadFile(type_, fileName, timestamp)

Private method to downlaod the given file.

type_ (str)
  type of the synchronization event (one of "bookmarks", "history", "passwords", "useragents" or "speeddial")
fileName (str)
  name of the file to be downloaded
timestamp (int)
  time stamp in seconds of the file to be downloaded

#### DirectorySyncHandler.__initialSync

__initialSync()

Private slot to do the initial synchronization.

#### DirectorySyncHandler.__initialSyncFile

__initialSyncFile(type_, fileName)

Private method to do the initial synchronization of the given file.

type_ (str)
  type of the synchronization event (one of "bookmarks", "history", "passwords", "useragents" or "speeddial")
fileName (str)
  name of the file to be synchronized

#### DirectorySyncHandler.__syncFile

__syncFile(type_, fileName)

Private method to synchronize the given file.

type_ (str)
  type of the synchronization event (one of "bookmarks", "history", "passwords", "useragents" or "speeddial")
fileName (str)
  name of the file to be synchronized

#### DirectorySyncHandler.__uploadFile

__uploadFile(type_, fileName)

Private method to upload the given file.

type_ (str)
  type of the synchronization event (one of "bookmarks", "history", "passwords", "useragents" or "speeddial")
fileName (str)
  name of the file to be uploaded

#### DirectorySyncHandler.initialLoadAndCheck

initialLoadAndCheck(forceUpload)

Public method to do the initial check.

forceUpload (bool)
  flag indicating a forced upload of the files

#### DirectorySyncHandler.shutdown

shutdown()

Public method to shut down the handler.

#### DirectorySyncHandler.syncBookmarks

syncBookmarks()

Public method to synchronize the bookmarks.

#### DirectorySyncHandler.syncHistory

syncHistory()

Public method to synchronize the history.

#### DirectorySyncHandler.syncPasswords

syncPasswords()

Public method to synchronize the passwords.

#### DirectorySyncHandler.syncSpeedDial

syncSpeedDial()

Public method to synchronize the speed dial data.

#### DirectorySyncHandler.syncUserAgents

syncUserAgents()

Public method to synchronize the user agents.

Up